<template>
	<view class="teamList">
		<nav-bars :title="title"></nav-bars>
		<view class="list">
			<view class="item" v-for="(item,index) in teamList" :key="index">
				<image :src="item.avatar.path" mode=""></image>
				<view class="info">
					<view class="name omit-1">
						{{item.name}}
					</view>
					<view class="position">
						首席设计师  8年经验
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import service_decoration from '@/service/decoration.js'
	export default{
		data(){
			return{
				type:'',//	团队类型(1设计师,2施工队)
				decoration_id:'',
				teamList:[],
				title:'团队列表'
			}
		},
		onLoad(options) {
			this.$utils.getUrl()
			this.type = options.type
			this.title = options.type==1?'设计团队':'施工团队'
			this.decoration_id = options.decoration_id
			this.getTeamList()
		},
		methods:{
			// 获取团队列表
			getTeamList(){
				let params = {
					decoration_id:this.decoration_id,
					team_type:this.type
				}
				service_decoration.getTeamList(params).then(res=>{
					console.log(res,'团队列表')
					if(res.code==1){
						this.teamList = res.data?res.data:[]
					}
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.teamList{
		.list{
			.item{
				width: 100%;
				height: 184rpx;
				background-color: #fff;
				padding: 0 32rpx;
				display: flex;
				align-items: center;
				margin-bottom: 16rpx;
				image{
					width: 104rpx;
					height: 104rpx;
					border-radius: 50%;
					margin-right: 24rpx;
				}
				.info{
					font: 500 28rpx/48rpx PingFang SC;
					color: #333;
					.position{
						font: 400 24rpx/44rpx PingFang SC;
						color: #939393;
					}
				}
			}
		}
	}
</style>
